<script language="javascript" type="text/javascript">
'global.CodInstServico'.namespace ();

global.CodInstServico.ajax = <?= class_exists ('xCodInstServico', FALSE) ? XOAD_Client::register (new xCodInstServico) : 'null' ?>;
    
global.CodInstServico.load = function (codigoSetor)
{
        
	var CodInstServico;

	CodInstServico = $('field_cpcx__inst_serv_protocolo');

        var codSetor;

        codSetor=$("field_cpcx__inst_serv_setorid");

	CodInstServico.value = '';
        
	if( codigoSetor != 0){
		CodInstServico.value = global.CodInstServico.ajax.loadCodigo(codigoSetor);
                codSetor.value=codigoSetor;
        }
}
function runOnLoad ()
{
	if($('field_cpcx__inst_serv_protocolo'))
		$('field_cpcx__inst_serv_protocolo').readOnly = true;

}
</script>
